package com.p7.framework.entity;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Range;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Person implements Serializable {

	private static final long serialVersionUID = -9142270679469739181L;

	@NotNull(message = "person.name_is_null")
	private String name;

	@NotNull(message = "person.age_is_null")
	@Range(min = 1, max = 200, message = "person.age_is_illegal")
	private Integer age;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date birthday;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

}
